import groovy.time.*


String t = params.get("time")

//System.out.println( "time " + t)
def start = Date.parse("yyy-MM-dd'T'HH:mm:ss.SSS",t );

TimeDuration duration = TimeCategory.minus(new Date(), start)

println "Days: ${duration.days}, Hours: ${duration.hours} Minutes: ${duration.minutes}"


//Date.parse("yyy-MM-dd'T'HH:mm:ss.SSSZ","2014-04-13T13:39:00.000+02:00".replace("+02:00","+0200"))
//Date.parse("yyy-MM-dd'T'HH:mm:ss.SSSZ","2010-10-07T22:15:33.110+01:00".replace("+01:00","+0100"))
//def start = Date.parse("yyy-MM-dd'T'HH:mm:ss.SSSZ",t.replace("02:00","+0200"))